<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    {if $city_name || $category_name}
        <title>{$city_name}{$category_name}资质代办公司_中介公司-奇快企服</title>
        <meta name="keywords" content="{$city_name}{$category_name}资质代办公司,{$city_name}{$category_name}资质办理中介">
        <meta name="description" content="上奇快企服平台找{$city_name}{$category_name}资质代办公司，汇集上千家建筑资质代办中介公司，建筑企业可快速获取多家中介公司资质代办服务咨询，{$city_name}{$category_name}资质代办费用，方便挑选最优质资质代办公司">
    {else /}
        <title>资质代办公司_西安建筑资质办理中介_资质代理企业-奇快企服</title>
        <meta name="keywords" content="资质代办公司,代办资质公司,建筑资质办理中介">
        <meta name="description" content="奇快企服平台汇集上千家建筑资质代办公司，建筑企业可快速获取多家中介公司进行资质代办服务咨询，资质代办费用，方便挑选最优质资质代办公司">
    {/if}
    

    <meta name="applicable-device" content="pc">
    <meta name="mobile-agent" content="format=html5; url="https://m.qikuai100.com/gs/" >
    <meta name="mobile-agent" content="format=xhtml; url="https://m.qikuai100.com/gs/" >
    <meta name="mobile-agent" content="format=wml; url="https://m.qikuai100.com/gs/" >
        
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    
    <link rel="icon" href="/icon.png" />
    <link rel="stylesheet" href="/static/index/css/reset.css">
    <link rel="stylesheet" href="/static/index/lib/bootstrap.css">
    <link rel="stylesheet" href="/static/index/css/common.css">
    <link rel="stylesheet" href="/static/index/css/home.css">
    <link rel="stylesheet" href="/static/index/css/company.css">
    <link rel="stylesheet" href="/static/index/css/page.css">
    <link rel="stylesheet" href="/static/index/lib/pick-pcc.css" />
    <script src="/static/index/lib/jquery-2.1.4.js"></script>
    <script src="/static/index/lib/page.js"></script>
    <script src="/static/index/lib/bootstrap.min.js"></script>
    <script type="text/javascript" src="/static/index/lib/template.js"></script>
    <style type="text/css">
    .pageTest {
        height: 50px;
        margin-top: 100px;
    }

    .activP {
        background-color: #367fa9!important;
        color: #fff!important;
    }

    .pick-show {
        border: none;
    }
    </style>
    <script>
            var _hmt = _hmt || [];
            (function() {
              var hm = document.createElement("script");
              hm.src = "https://hm.baidu.com/hm.js?8b340ebdd740974de9d621b14ab09b43";
              var s = document.getElementsByTagName("script")[0]; 
              s.parentNode.insertBefore(hm, s);
            })();
        </script>
</head>

<body>
    {include file="public/push"}
    
    {include file="public/header"}
    <div class="nav_common wdSafe" style="overflow: hidden;">
        <ol class="breadcrumb pull-left">
            <li><a href="/">首页</a></li>
            <li>资质代办公司</li>
            <li class="active"><a href="javascript:;">{$city_name}{$category_name}</a></li>
        </ol>
    </div>

    <div class="widthFullScreen company_container" style="padding-top: 0;">
        <div class="wdSafe company_wrap">
            <!-- 筛选 -->
            <div class="shaixuan_wrap border_bottom clearfix">
                <div class="pull-left label_title">地区：</div>
                <ul class="pull-left list_shaixuan clearfix" id="OneCityHtml">
                    <li class="active">
                        <a href="javascript:;">全国</a>
                    </li>
                   
                </ul>
                <div class="pull-right moreBtn accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">更多
                    <!--<div class="dropup pull-right"><span class="caret"></span></div>-->
                    <div class="dropdown pull-right"><span class="caret"></span></div>
                </div>
                <br>
                <div id="collapseOne" class="accordion-body collapse" style="height: 0px; padding-left: 42px;">
                    <ul class="pull-left list_shaixuan clearfix" id="TwoCityHtml">
                        
                    </ul>
                </div>
            </div>
            <div class="shaixuan_wrap clearfix">
                <div class="pull-left label_title">资质类别：</div>
                <ul class="pull-left list_shaixuan clearfix" id="OneCategoryHtml">
                    
                </ul>
                <div class="pull-right moreBtn accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo">更多
                    
                    <div class="dropdown pull-right"><span class="caret"></span></div>
                </div>
                <br>
                <div id="collapseTwo" class="accordion-body collapse" style="height: 0px; padding-left: 42px;">
                    <ul class="pull-left list_shaixuan clearfix" id="twoCategoryHtml">

                    </ul>
                </div>
            </div>
        </div>
        <div class="wdSafe company_list clearfix">
            <div class="left_box pull-left">
                <div class="compress_wrap">
                    <div class="line_left pull-left"></div>
                    <ul class="left_compress_list pull-left clearfix" id="threeHtml">
                        <!-- <li class="active">
                            <a href="">综合排序</a>
                        </li> -->
                    </ul>

                    <div class="pull-right company_num">共有<span id="totalNumC">24</span>家服务商满足您的需求</div>
                </div>
                <div>
                    {foreach $company_list.list as $item }
                        <div class="company_tap">
                            <a href="/company/{$item.id}/" class="pull-left cpmp_dt_news">
                                <img class="com_img pull-left" src="{$item.logo}" alt="" />
                                <div class="pull-left comp_word">
                                    <div class="com_name ellipcs">{$item.name}</div>
                                    <div class="fuwu_wrap clearfix">
                                        <div class="fuwu_title pull-left">擅长服务：</div>
                                        <ul class="pull-left company_userd clearfix">
                                            <li>{$item.categorys}</li>
                                        </ul>
                                    </div>
                                    <div class="address_com ellipcs">地址：{$item.address}</div>
                                </div>
                            </a>
                            <div class="pull-right right_comp">
                                <div class="style_word">服务平分：<span>{$item.star}</span></div>
                                <div class="style_word">已有<span>{$item.view_num}人</span>查看并咨询</div>
                                <a href="/baojia/" class="check_price">免费获取报价</a>
                            </div>
                        </div>
                    {/foreach}
                    <!-- 分页 -->
                    <div class="pageTest" id="pageScriptrBox">

                    </div>

                </div>
            </div>
            <div class="right_box pull-right">
                <!-- 免费获取报价 -->
                <div class="form_box" style="width: 100%; height: auto; padding: 0;">
                    <div class="form_title text-center comp_right_tit">专业服务公司免费为您提供报价方案</div>
                    <div class="form_sub_title text-center">今日已有<span>890</span>人已办理</div>
                    <div style="padding: 0 45px 60px;">
                        <input style="border: none;margin-bottom: 20px;" class="bannerIpt bgName" id="name" type="text" placeholder="请输入姓名" />
                        <div style="border: none;" class="pick-area bgAddress pick-area2" name="" style="margin-top: 24px;"></div>
                        <!--<input class="" id="addressOne" type="text" class="pick-area-hidden" placeholder="请选择地址"/>-->
                        <input style="border: none;" class="bannerIpt bgPhone" id="phone" type="number" placeholder="请输入联系电话" />
                        <div class="codeBox" style="border: none;background: #fff;">
                            <input type="text" name="" id="codeNum" value="" placeholder="请输入验证码" class="codeNumBox" />
                            <input type="button" name="" id="sendCode" value="发送验证码" class="sendCodeBox" />
                        </div>
                        <input class="form_box_btn" onclick="getOrder()" value="免费咨询报价" type="button" />
                        
                    </div>
                </div>
                <!-- 热门公司 -->
                <div class="hot_company">
                    <div class="top_bg_hot"></div>
                    <div class="hot_list">
                        <div class="hot_title text-center">热门服务公司</div>
                        <ul class="hot_list_com" id="hotCompanyList">
                            {foreach $rec_list as $item }
                                <li class="clearfix">
                                    <a href="/company/{$item.id}/">
                                        <div class="pull-left number_hot">{$item.title}</div>
                                        <div class="pull-left name_comp">{$item.name}</div>
                                    </a>
                                </li>
                            {/foreach}
                        </ul>
                    </div>
                    <div class="bottom_bg_hot">资质帮手放心的平台</div>
                </div>
                <!-- 服务优势 -->
                <div class="sever_advantage">
                    <div class="hot_title text-center" style="border-bottom: none;">资质帮手的三大服务优势</div>
                    <div class="advantage_dt clearfix">
                        <div class="advantage_name pull-left">简便</div>
                        <div class="advantage_text pull-left">
                            <p>繁琐程序</p>
                            <div>资质专家一步搞定</div>
                        </div>
                    </div>
                    <div class="advantage_dt clearfix">
                        <div class="advantage_name pull-left">透明</div>
                        <div class="advantage_text pull-left">
                            <p>严格监管</p>
                            <div>服务报价，保障价格透明</div>
                        </div>
                    </div>
                    <div class="advantage_dt clearfix">
                        <div class="advantage_name pull-left">专业</div>
                        <div class="advantage_text pull-left">
                            <p>服务经过</p>
                            <div>严格审核，绝对真实专业</div>
                        </div>
                    </div>
                    <div class="code_box clearfix">
                        <img class="code_pic" src="https://img.qikuai100.com/code.png" alt="" />
                        <div class="code_text">关注生活号，实时掌握最新动态</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="widthFullScreen heightGray"></div>
    {include file="public/footer"}
    <script type="text/javascript" src="/static/index/lib/pick-pcc.min.1.0.2.js"></script>
    <script type="text/javascript" src="/static/index/layer/layer.js"></script>
    <script type="text/javascript" src="/static/index/js/orderCode.js"></script>
    <script>

    // 标签综合:multi,人气:view,优质服务:star
    $(".pick-area2").pickArea({
        "format": "省份/城市", //格式
        "width": "288",
        "borderColor": "#d9eeff", //文本边框的色值
        "arrowColor": "#555555", //箭头颜色
        "listBdColor": "#c5c6c6", //下拉框父元素ul的border色值
        "color": "#666666", //字体颜色
        "fontSize": "16px", //字体大小
        "paddingLeft": "38px",
        "arrowRight": "10px",
        "preSet": "北京市/市辖区",
        "getVal": function() {
            console.log($(".pick-area-hidden").val())
        }
    });

    var baseUrl = 'https://api.qikuai100.com/';
    var categoriesList = { // 所有资质类别重新组成的数据
        name: "资质类别",
        cateList: []
    };

    var cityList = { // 所有资质类别重新组成的数据
        name: "城市列表",
        cityListDta: []
    };

    var stateList = {
        name: "筛选条件",
        listSta: [
            {
                id: 'multi',
                name: '综合排序'
            },
            {
                id: 'view',
                name: '人气推荐'
            },
            {
                id: 'star',
                name: '优质服务'
            }
        ]
    };
    


    var dId = {$id}, // 传递的资质id
        idCity = {$idCity}, // 城市
        staId = '{$staId}',  // 筛选
        pageNum = {$page}, // 当前页
        totalPageNum = 2;

    $(function() {
        initChooseList();
        initCityList();
        initCompList();
        // initHotCompany();
    });

    /**
    * 初始化筛选条件
    */
    function initChooseList() {
        $.ajax({
            type: "POST",
            url: baseUrl + "api/category/list",
            data: {
                "type": 1
            },
            success: function(result) {
                if (result.ret == 0) {
                    var dataL = result;
                    for (var i = 0; i < result.data.length; i++) {
                        for (var j = 0; j < result.data[i].subcategoy.length; j++) {
                            categoriesList.cateList.push(result.data[i].subcategoy[j]);
                        }
                    }
                    var json = {
                        category_name: '不限',
                        id: '0'
                    }
                    categoriesList.cateList.unshift(json);

                    var html = '',
                        htmlMore = '';
                    for (var i = 0; i < categoriesList.cateList.length; i++) {
                        var chooseClass = '';
                        categoriesList.cateList[i].id == dId ? chooseClass = 'active' : chooseClass = '';
                        if (i <= 6) {
                            html += '<li class="' + chooseClass + '" >' +
                                '<a href="/gs/' + staId + 'g' + categoriesList.cateList[i].id + 'g'+ idCity +'/1/">' + categoriesList.cateList[i].category_name + '</a>' +
                                '</li>';
                        } else {
                            htmlMore += '<li class="' + chooseClass + '" >' +
                                '<a href="/gs/' + staId + 'g' + categoriesList.cateList[i].id + 'g'+ idCity +'/1/">' + categoriesList.cateList[i].category_name + '</a>' +
                                '</li>';
                        }
                    }
                    $('#OneCategoryHtml').html(html);
                    $('#twoCategoryHtml').html(htmlMore);
                }
            }
        });
    }

    /**
    * 初始化城市列表
    */
    function initCityList() {
        $.ajax({
            type: "POST",
            url: baseUrl + "api/city/list",
            data: {},
            success: function(result) {
                if (result.ret == 0) {
                    cityList.cityListDta = result.data;
                    var json = {
                        dist_name: '不限',
                        id: 0
                    }
                    cityList.cityListDta.unshift(json);
                    var html = '',
                        htmlMore = '';
                    for (var i = 0; i < cityList.cityListDta.length; i++) {
                        var chooseClass = '';
                        cityList.cityListDta[i].id == idCity ? chooseClass = 'active' : chooseClass = '';
                        if (i <= 10) {
                            html += '<li class="' + chooseClass + '" >' 
                                 +      '<a href="/gs/' + staId + 'g' + dId + 'g'+ cityList.cityListDta[i].id +'/1/">' + cityList.cityListDta[i].dist_name + '</a>' 
                                 +  '</li>';
                        } else {
                            htmlMore += '<li class="' + chooseClass + '" >' +
                                     +      '<a href="/gs/' + staId + 'g' + dId + 'g'+ cityList.cityListDta[i].id +'/1/">' + cityList.cityListDta[i].dist_name + '</a>' 
                                     +  '</li>';
                        }
                    }
                    $('#OneCityHtml').html(html);
                    $('#twoCityHtml').html(htmlMore);
                }
            }
        });
    }

    /**
    *   获取资质分类代办公司列表
    */
    function initCompList() {
        stateFun();
        $.ajax({
            type: "POST",
            url: baseUrl + "api/company/list",
            data: {
                "id": dId,
                "page": pageNum,
                "dist_id": idCity,
                "tag": staId
            },
            success: function(result) {
                console.log(result);
                if (result.ret == 0) {
                    totalPageNum = result.data.totalPage;
                    var html = '<a href="/gs/' + staId + 'g' + dId + 'g' + idCity +'/1/" class="page_btn pageNum_box">首页</a>';
                    var activeStyle = result.data.currentPage;
                    for(var i = 0; i < totalPageNum; i++){
                        var num = i + 1;
                        if(num == activeStyle){
                            html += '<a href="/gs/' + staId + 'g' + dId + 'g' + idCity + '/' + num +'/" class="page_btn pageNum_box active">'+ num +'</a>';
                        }else{
                            html += '<a href="/gs/' + staId + 'g' + dId + 'g' + idCity + '/' + num +'/" class="page_btn pageNum_box">'+ num +'</a>'
                        }
                    }
                    html += '<a href="/gs/' + staId + "g" + dId + "g" + idCity + "/" +totalPageNum +'/" class="page_btn pageLastBox">尾页</a>';
                    $('#pageScriptrBox').html(html);
                    // 公司数据
                    // var htmlCompany = template('companyScript', result.data);
                    // document.getElementById('companyHtml').innerHTML = htmlCompany;
                    // totalPageNum = result.data.totalPage;
                    // $('#totalNumC').html(result.data.totalNum);
                    // pageNumFun();
                }
            }
        });
    }

    /**
    * 三个排序方式
    */
    function stateFun(){
        var html = '';
        for(var i = 0;i < stateList.listSta.length; i++){
            var chooseClass = '';
            stateList.listSta[i].id == staId ? chooseClass = 'active' : chooseClass = '';
            html += '<li class="' + chooseClass + '"><a href="/gs/' + stateList.listSta[i].id + 'g'+ dId +'g'+ idCity +'">' + stateList.listSta[i].name + '</a></li>'
        }
        $('#threeHtml').html(html);
    }

    /**
     *分页组件 *
     */
    function pageNumFun(){
        $('.pageTest').page({
            leng: totalPageNum, //分页总数
            activeClass: 'activP', //active 类样式定义
            clickBack: function(page) {
                console.log(page);
                pageNum = page;
                location.href = "/gs/" + staId + "g" + dId + "g" + idCity + "/" + pageNum;
                // initCompList();
            }
        });
    }

    // 加载 热门公司
    function initHotCompany() {
        $.ajax({
            type: "POST",
            url: baseUrl + "api/company/list",
            data: {
                "page": 1
            },
            success: function(result) {
                if (result.ret == 0) {
                    var dateHot = result.data;
                    // console.log(dateHot)
                    var hotList = {
                        "name": '热门公司',
                        "list": []
                    };
                    for (var i = 0; i < 6; i++) {
                        if(dateHot.list[i]){
                            var json = {
                                "title": 'No' + (i + 1),
                                "name": dateHot.list[i].name,
                                "id": dateHot.list[i].id
                            };
                            hotList.list.push(json);
                        }
                    }
                    var hotCompanyList = template('hotCompantScript', hotList);
                    document.getElementById('hotCompanyList').innerHTML = hotCompanyList;
                }
            }
        });
    };
    
    </script>
</body>

</html>